(function($) {
	/**
	 * 选择图片
	 * @param {{multiple?:boolean,}} options
	 * @return {Promise}
	 */
	$.define('chooseImage', function(options = {}) {
		//todo 选择图片未实现
		return new Promise((resolve, reject) => {
			reject(new Error('chooseImage 未实现'));
		}, options);
	});

	/**
	 * 预览图片
	 * @param {{current:string,urls:Array<string>,}} options
	 * @return {Promise}
	 */
	$.define('previewImage', function(options = {}) {
		//todo 预览图片未实现
		return new Promise((resolve, reject) => {
			reject(new Error('previewImage 未实现'));
		}, options);
	});

	/**
	 * 获取图片信息
	 * @param {{urls:string,}} options
	 * @return {Promise}
	 */
	$.define('getImageInfo', function(options = {}) {
		return new Promise((resolve, reject) => {
			const image = new Image();
			image.onload = resolve;
			image.onabort = image.onerror = reject;
		}, options);
	});
})($);
